package model.levels;

import model.surface.Scale;

import com.example.towerdefence.R;

/**
 * Enum representing different levels in the game. It contains information about
 * the background of the level, the width of the path and the points for the
 * path which are saved in JSON file.
 * 
 * @author EvilTeam
 * 
 */
public enum Levels {

	LEVEL1(R.drawable.background1, Scale.getScreenHeight() / 7.5f,
			"level1.json");

	private int backgroundId;
	private float pathWidth;
	private String levelFileName;

	private Levels(int backgroundId, float pathwidth, String pathFileName) {
		this.setBackgroundId(backgroundId);
		this.setPathWidth(pathwidth);
		this.setLevelFileName(pathFileName);
	}

	public int getBackgroundId() {
		return backgroundId;
	}

	public void setBackgroundId(int backgroundId) {
		this.backgroundId = backgroundId;
	}

	public float getPathWidth() {
		return pathWidth;
	}

	public void setPathWidth(float pathwidth) {
		if (pathwidth > 0)
			this.pathWidth = pathwidth;
	}

	public String getLevelFileName() {
		return levelFileName;
	}

	public void setLevelFileName(String pathFileName) {
		if (pathFileName != null && pathFileName.length() > 0)
			this.levelFileName = pathFileName;
	}

}
